/**
 *  Introduces component library styles on demand.
 * https://github.com/anncwb/vite-plugin-style-import
 */
 import type { Plugin } from 'vite';
 import {
  createStyleImportPlugin,
  ElementPlusResolve,
 } from 'vite-plugin-style-import';
import ViteComponents, { ElementPlusResolver } from 'vite-plugin-components'

export function configElementPlusPlugin(isBuild?: boolean): Plugin[] {
  return [
    createStyleImportPlugin({
      resolves: [ElementPlusResolve()]
    }),
    ViteComponents({
      customComponentResolvers: [ElementPlusResolver()]
    })
  ]
} 

